# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-gitpython
_pkgname=GitPython
pkgver=3.0.5
pkgrel=2
pkgdesc='A python library used to interact with Git repositories.'
url='https://github.com/gitpython-developers/gitpython'
license=('BSD')
arch=('any')
depends=('git' 'python2-gitdb')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/GitPython-$pkgver.tar.gz")
sha512sums=('bb47f1dcbe753d7c413f51e48e545b4406b793ad795dd7de3c6aeee313a0ad6409876886cb4b7ebbbddae6a4d2a3f108f403b22133069a61ccb3aef32ab120ad')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

